[gd_scene load_steps=6 format=3 uid="uid://cmdg02yaewh3p"]

[ext_resource type="Script" path="res://scenes/entities/SimpleMovable.gd" id="1_t3o32"]
[ext_resource type="PackedScene" uid="uid://daf71uqxwvean" path="res://scenes/components/Health.tscn" id="3_8ff8y"]

[sub_resource type="CylinderMesh" id="CylinderMesh_egxx8"]
top_radius = 0.02
bottom_radius = 0.2
height = 0.8

[sub_resource type="BoxShape3D" id="BoxShape3D_to85q"]
size = Vector3(1, 3.91044, 0.152527)

[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_3ldft"]
radius = 0.994782
height = 4.132

[node name="SimpleMovable" type="CharacterBody3D" groups=["movable"]]
collision_layer = 4
collision_mask = 7
floor_block_on_wall = false
floor_max_angle = 0.436332
script = ExtResource("1_t3o32")

[node name="RotationPoint" type="Marker3D" parent="."]

[node name="RotationVisualizer" type="MeshInstance3D" parent="RotationPoint"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 1.99099, 0)
visible = false
mesh = SubResource("CylinderMesh_egxx8")

[node name="StaticMesh" type="MeshInstance3D" parent="RotationPoint"]

[node name="FrontFloorRayCast" type="RayCast3D" parent="RotationPoint"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.17584, -1.1078)
target_position = Vector3(0, -50, 0)
collision_mask = 37
collide_with_areas = true

[node name="FrontCeilingRayCast" type="RayCast3D" parent="RotationPoint"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.17584, -1.1078)
target_position = Vector3(0, 6, 0)
collide_with_areas = true

[node name="FloorRayCast" type="RayCast3D" parent="RotationPoint"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0976213, 0)
target_position = Vector3(0, -5, 0)
collision_mask = 37
collide_with_areas = true

[node name="FrontRayCast" type="RayCast3D" parent="RotationPoint"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.415777, -1.00435)
target_position = Vector3(0, 0, -0.3)
collision_mask = 39
collide_with_areas = true

[node name="LeftWallRayCast" type="RayCast3D" parent="RotationPoint"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.981563, 0.379314, 0)
target_position = Vector3(-0.3, 0, 0)
collide_with_areas = true

[node name="RightWallRayCast" type="RayCast3D" parent="RotationPoint"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.982, 0.379, 0)
target_position = Vector3(0.3, 0, 0)
collide_with_areas = true

[node name="LeftFloorRayCast" type="RayCast3D" parent="RotationPoint"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.05334, 1.17584, 0)
target_position = Vector3(0, -50, 0)
collision_mask = 37
collide_with_areas = true

[node name="RightFloorRayCast" type="RayCast3D" parent="RotationPoint"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.0615, 1.17584, 0)
target_position = Vector3(0, -50, 0)
collision_mask = 37
collide_with_areas = true

[node name="FrontArea" type="Area3D" parent="RotationPoint"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.0506871)
collision_layer = 0
collision_mask = 7

[node name="CollisionShape3D" type="CollisionShape3D" parent="RotationPoint/FrontArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.10338, -1.06644)
shape = SubResource("BoxShape3D_to85q")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.06319, 0)
shape = SubResource("CapsuleShape3D_3ldft")

[node name="Health" parent="." instance=ExtResource("3_8ff8y")]

[node name="SpeedModResetTimer" type="Timer" parent="."]
one_shot = true

[connection signal="body_entered" from="RotationPoint/FrontArea" to="." method="_on_front_area_body_entered"]
[connection signal="body_exited" from="RotationPoint/FrontArea" to="." method="_on_front_area_body_exited"]
[connection signal="timeout" from="SpeedModResetTimer" to="." method="_on_speed_mod_reset_timer_timeout"]
